from sklearn.preprocessing import StandardScaler, MinMaxScaler
import numpy as np

# 创建数据
X = np.array([[1, 2], [2, 3], [3, 4], [4, 5]])

# 标准化
scaler = StandardScaler()
X_scaled = scaler.fit_transform(X)

# 归一化
min_max_scaler = MinMaxScaler()
X_normalized = min_max_scaler.fit_transform(X)

print("Scaled data:\n", X_scaled)
print("Normalized data:\n", X_normalized)